using System;

namespace Slaks.Filters
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	public abstract class AFilter
	{
		protected static readonly char GeneralEndOfSentencePunctuationMarkDot = '.';
		protected static readonly char GeneralEndOfSentencePunctuationMarkQuestion = '?';
		protected static readonly char GeneralEndOfSentencePunctuationMarkExclamation = '!';

		protected static readonly char GeneralMiddleOfSentencePunctuationMarkComma = ',';

		public AFilter()
		{
			
		}
    /// <summary>
    /// If the character is one that is defined as 'space' character, then return true
    /// Each language has its own characters that can be defined as space characters
    /// For example : in english it can be '\t', ' '
    /// </summary>
    /// <param name="ch">character to check</param>
    /// <returns>true/false</returns>
    public abstract bool IsWhiteSpace(char ch);

    /// <summary>
    /// If the character is a part of the term but must be skipped then return true;
    /// Example : term 'up-to-date' then '-' can be skipped to create new term 'uptodate'
    /// </summary>
    /// <param name="ch">character to check</param>
    /// <returns>true/false</returns>
    public virtual bool DoSkipCharInTerm(char ch)
    {
      return false;
    }

    /// <summary>
    /// Normalization of the character
    /// Example: Capital letter convert to low
    /// </summary>
    /// <param name="ch">normalized character</param>
    /// <returns>char</returns>
    public abstract char Normalize(char ch);

    /// <summary>
    /// Indicate whether the punctuation mark was reached (.,!?...)
    /// </summary>
    /// <param name="ch"></param>
    /// <returns></returns>
    public virtual bool IsMiddleSentencePunctuationMark(char ch)
    {
      return false;
    }

    /// <summary>
    /// Indicate whether the end of sentence was reached 
    /// </summary>
    /// <param name="ch">current character to check</param>
    /// <returns></returns>
    public virtual bool IsEndOfSentencePunctuationMark(char ch)
    {
      return false;
    }

    public virtual bool IsSpecialCharacter(char ch)
    {
      return false;
    }
	}
}
